<template>
  <div>
    <h2>按钮</h2>
    <el-button round>圆角按钮</el-button>
    <el-button type="primary" round>主要按钮</el-button>
    <el-button type="success" round>成功按钮</el-button>
    <el-button type="info" round>信息按钮</el-button>
    <el-button type="warning" round>警告按钮</el-button>
    <h2>表单验证</h2>
    <el-form :model="form1" :rules="rules">
      <el-form-item prop="name">
        <el-input placeholder="请输入用户名" v-model="form1.name"></el-input>
      </el-form-item>
      <el-form-item prop="pwd">
        <el-input placeholder="请输入密码" v-model="form1.pwd"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" round style="width:100%">登录</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data () {
    return {
      form1: {
        name: '',
        pwd: ''
      },
      rules: {
        name: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
        pwd: [
          { required: true, message: '请输入密码', trigger: 'blur' },
          { min: 4, max: 6, message: '长度4-6个', trigger: 'blur' }
        ]
      }
    }
  }
}
</script>

<style></style>
